package kr.co.m2soft.model.document
{
	import kr.co.m2soft.model.BaseModel;
	import kr.co.m2soft.model.IBaseModelParser;
	import kr.co.m2soft.model.elements.FA;
	import kr.co.m2soft.model.elements.Font;
	import kr.co.m2soft.model.elements.LA;
	import kr.co.m2soft.model.elements.TA;
	
	import mx.collections.ArrayCollection;

	public class Head extends BaseModel implements IBaseModelParser
	{
		private var _document:Object;
		private var _fontList:ArrayCollection;
		private var _TAList:ArrayCollection;
		private var _LAList:ArrayCollection;
		private var _FAList:ArrayCollection;
		
		public function Head()
		{
		}
		
		public function parser():void
		{
			
			if(dataProvider.FONTLIST){
				_fontList = new ArrayCollection();
				for each(var fontItem:* in dataProvider.FONTLIST.FONT){
					var font:Font = new Font();
					font.dataProvider = fontItem;
					font.parser();
					_fontList.addItem(font);
				}
			}
			if(dataProvider.TALIST){
				_TAList = new ArrayCollection();
				for each(var taItem:* in dataProvider.TALIST.TA){
					var ta:TA = new TA();
					ta.dataProvider = taItem;
					ta.parser();
					_TAList.addItem(ta);
				}
			}
			if(dataProvider.LAIST){
				_LAList = new ArrayCollection();
				for each(var laItem:* in dataProvider.LALIST.LA){
					var la:LA = new LA();
					la.dataProvider = laItem;
					la.parser();
					_LAList.addItem(la);
				}
			}
			if(dataProvider.FALIST){
				_FAList = new ArrayCollection();
				for each(var faItem:* in dataProvider.FALIST.FA){
					var fa:FA = new FA();
					fa.dataProvider = faItem;
					fa.parser();
					_FAList.addItem(fa);
				}
			}
		}
		
		public function get document():Object
		{
			return _document;
		}

		public function set document(value:Object):void
		{
			_document = value;
		}

		public function get fontList():ArrayCollection
		{
			return _fontList;
		}

		public function set fontList(value:ArrayCollection):void
		{
			_fontList = value;
		}

		public function get TAList():ArrayCollection
		{
			return _TAList;
		}

		public function set TAList(value:ArrayCollection):void
		{
			_TAList = value;
		}

		public function get LAList():ArrayCollection
		{
			return _LAList;
		}

		public function set LAList(value:ArrayCollection):void
		{
			_LAList = value;
		}

		public function get FAList():ArrayCollection
		{
			return _FAList;
		}

		public function set FAList(value:ArrayCollection):void
		{
			_FAList = value;
		}

	}
}